<?php

  //define ('INSTALL_DIR' , '/opt/lampp/htdocs/LP06/orders-dev/');
   define ('INSTALL_DIR' , './');
  define ('CLASS_FILE_SUFFIX' , '.class.php');

set_include_path ( get_include_path() . PATH_SEPARATOR . dirname(__FILE__).DIRECTORY_SEPARATOR. '..'.DIRECTORY_SEPARATOR.'pat/patError' . 
		   PATH_SEPARATOR . dirname(__FILE__).DIRECTORY_SEPARATOR. '..'.DIRECTORY_SEPARATOR.'pat/patTemplate' );


require_once 'patErrorManager.php';
require_once 'patTemplate.php';



  function __autoload($className) {

    if (stripos($className, 'pat') === false) {

    $autoloadPath = dirname(__FILE__);
    $installDir = $autoloadPath . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR;
    
    $myAppClasspath = PATH_SEPARATOR . $installDir . 'db/classe' .
                      PATH_SEPARATOR . $installDir . 'db/config' .
                      PATH_SEPARATOR . $installDir . 'config' .
                      PATH_SEPARATOR . $installDir . 'model' .
                      PATH_SEPARATOR . $installDir . 'ricarly/classe' .
                      PATH_SEPARATOR . $installDir . 'ricarly/lib/helper' .
                      PATH_SEPARATOR . $installDir . 'view/classe' .
                      PATH_SEPARATOR . $installDir . 'view/template' .
                      PATH_SEPARATOR . $installDir . 'view/module' .
                      PATH_SEPARATOR . $installDir . 'view/module/home' .
                      PATH_SEPARATOR . $installDir . 'view/module/contact' .
                      PATH_SEPARATOR . $installDir . 'controller' .
                      PATH_SEPARATOR . $installDir . 'lib' .
                      PATH_SEPARATOR . $installDir . 'lib/mail' .
                      PATH_SEPARATOR . $installDir . 'lib/pdf' .
                      PATH_SEPARATOR . $installDir . 'lib/common' .
                      PATH_SEPARATOR . $installDir . 'form/classe' .
                      PATH_SEPARATOR . $installDir . 'form/service' .
                      PATH_SEPARATOR . $installDir . 'web/style' .
                      PATH_SEPARATOR . $installDir . 'web/image' .
                      PATH_SEPARATOR . $installDir . 'web/script' ;

    $systemIncludePath = get_include_path() ;
    set_include_path( $systemIncludePath . $myAppClasspath );
    require_once ($className. CLASS_FILE_SUFFIX);
    set_include_path( $systemIncludePath );
    }
  }

?>

    
